package club.kingyin.easycache.component.handler;

import club.kingyin.easycache.component.ExceptionFilter;
import club.kingyin.easycache.exception.InvokeException;
import club.kingyin.easycache.utils.ExceptionUtils;

public class NetworkExceptionFilter implements ExceptionFilter {
    /**
     * 出现网络异常不计入缓存
     * @param e 异常
     * @return 判断结果
     */
    @Override
    public boolean filter(InvokeException e) {
        // 判断是否属于网络异常，
        return !ExceptionUtils.belongToNetWorkException(e);
    }
}
